package com.jprocms.module.cms.controller.admin.site.vo;


import com.jprocms.module.cms.enums.EnumIntCommonStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Schema(description = "站点查询 Request VO")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class SiteQueryReqVO {

    @Schema(description = "站点名称")
    private String name;

    @Schema(description = "站点域名")
    private String siteDomain;

    @Schema(description = "站点路径")
    private String sitePath;

    @Schema(description = "状态")
    private Integer status;

    @Schema(description = "是否允许推送")
    private Integer allowPush;

    @Schema(description = "父站点ID")
    private Integer parentId;

    @Schema(description = "是否包含子站点")
    private boolean includeChild;

    public SiteQueryReqVO(Integer parentId, boolean includeChild, Integer status) {
        this.parentId = parentId;
        this.includeChild = includeChild;
        this.status = status;
    }

    public static SiteQueryReqVO of(Integer parentId, boolean includeChild) {
        return new SiteQueryReqVO(parentId, includeChild, EnumIntCommonStatus.OPEN.getStatus());
    }

}
